package com.example.boot1.service.impl;

import com.example.boot1.mapper.AopDemoMapper;
import com.example.boot1.service.AopDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class AopDemoServiceImpl implements AopDemoService {


    @Autowired
    AopDemoMapper aopDemoMpper;

    @Override
    @Transactional
    public void batchAdd(String name,String password) {
        aopDemoMpper.batchAdd( name, password);
        //int i= 10/0;
        aopDemoMpper.batchAdd( name+"1", password+"1");
    }
}
